package com.wicket.okrcalc.integration.dto;

import com.wicket.okrcalc.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc FieldDataDto
 * @使用场景
 */
@Data
public class FieldDataDto extends BaseDto implements Serializable {

  /**
   * 上一更新周期ID
   */
  @ApiModelProperty("上一更新周期ID")
  private String preUpdateCycleId;

  /**
   * 更新周期ID
   */
  @ApiModelProperty("更新周期ID")
  private String updateCycleId;

  /**
   * 更新周期开始时间
   */
  @ApiModelProperty("更新周期开始时间")
  private String updateCycleStartTime;

  /**
   * 更新周期结束时间
   */
  @ApiModelProperty("更新周期结束时间")
  private String updateCycleEndTime;

  /**
   * 更新周期类型标识
   */
  @ApiModelProperty("更新周期类型标识")
  private String updateCycleTypeCode;

  /**
   * 是否末级周期
   */
  @ApiModelProperty("是否末级周期")
  private String isLastCycle;

  /**
   * 父子中过程周期类型
   */
  @ApiModelProperty("父子中过程周期类型")
  private String parentSubMidCycleType;

  /**
   * 被评对象目标周期标识
   */
  @ApiModelProperty("被评对象目标周期标识")
  private String evaObjTargetCycleCode;

  /**
   * 上级被评对象目标周期标识
   */
  @ApiModelProperty("上级被评对象目标周期标识")
  private String parentEvaObjTargetCycleId;

  /**
   * 数据归属内容表主键ID
   */
  @ApiModelProperty("数据归属内容表主键ID")
  private String belongToContentId;

  /**
   * 被评对象内容表主键ID
   */
  @ApiModelProperty("被评对象内容表主键ID")
  private String evaObjEntityId;

  /**
   * 被评对象类型编码
   */
  @ApiModelProperty("被评对象类型编码")
  private String evaObjTypeCode;

  /**
   * 评价模板ID
   */
  @ApiModelProperty("评价模板ID")
  private String evaluationTemplateId;

  /**
   * 事务内数据更新批次标识
   */
  @ApiModelProperty("事务内数据更新批次标识")
  private String eventBatchUpdateCode;

  /**
   * 计算开始时间
   */
  @ApiModelProperty("计算开始时间")
  private String calcStartTime;

  /**
   * 目标得分单位
   */
  @ApiModelProperty("目标得分单位")
  private String targetScoreUnit;

  /**
   * 数据计算正常与异常场景
   */
  @ApiModelProperty("数据计算正常与异常场景")
  private String dataCalcNormalAbnormal;

  /**
   * 被评对象目标周期ID
   */
  @ApiModelProperty("被评对象目标周期ID")
  private String evaObjTargetCycleId;

  /**
   * 关联归属主体标识
   */
  @ApiModelProperty("关联归属主体标识")
  private String accountContentCode;

  /**
   * 是否开启资金到账
   */
  @ApiModelProperty("是否开启资金到账")
  private String isOpenFundsArrival;

  /**
   * 周期模式
   */
  @ApiModelProperty("周期模式")
  private String cycleMode;

  /**
   * 操作人就职记录ID
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 空间ID
   */
  @ApiModelProperty("空间ID")
  private String spaceId;

  /**
   * 冗余单位
   */
  @ApiModelProperty("冗余单位")
  private String unit;

  /**
   * MQ队列数据当前值
   */
  @ApiModelProperty("MQ队列数据当前值")
  private Long mqDataPosition;

  /**
   * 创建于应用ID
   */
  @ApiModelProperty("创建于应用ID")
  private String appId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    FieldDataDto that = (FieldDataDto) o;
    return (
      preUpdateCycleId == that.preUpdateCycleId &&
      updateCycleId == that.updateCycleId &&
      updateCycleStartTime == that.updateCycleStartTime &&
      updateCycleEndTime == that.updateCycleEndTime &&
      updateCycleTypeCode == that.updateCycleTypeCode &&
      isLastCycle == that.isLastCycle &&
      parentSubMidCycleType == that.parentSubMidCycleType &&
      evaObjTargetCycleCode == that.evaObjTargetCycleCode &&
      parentEvaObjTargetCycleId == that.parentEvaObjTargetCycleId &&
      belongToContentId == that.belongToContentId &&
      evaObjEntityId == that.evaObjEntityId &&
      evaObjTypeCode == that.evaObjTypeCode &&
      evaluationTemplateId == that.evaluationTemplateId &&
      eventBatchUpdateCode == that.eventBatchUpdateCode &&
      calcStartTime == that.calcStartTime &&
      targetScoreUnit == that.targetScoreUnit &&
      dataCalcNormalAbnormal == that.dataCalcNormalAbnormal &&
      evaObjTargetCycleId == that.evaObjTargetCycleId &&
      accountContentCode == that.accountContentCode &&
      isOpenFundsArrival == that.isOpenFundsArrival &&
      cycleMode == that.cycleMode &&
      operationInductionId == that.operationInductionId &&
      spaceId == that.spaceId &&
      unit == that.unit &&
      mqDataPosition == that.mqDataPosition &&
      appId == that.appId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      preUpdateCycleId,
      updateCycleId,
      updateCycleStartTime,
      updateCycleEndTime,
      updateCycleTypeCode,
      isLastCycle,
      parentSubMidCycleType,
      evaObjTargetCycleCode,
      parentEvaObjTargetCycleId,
      belongToContentId,
      evaObjEntityId,
      evaObjTypeCode,
      evaluationTemplateId,
      eventBatchUpdateCode,
      calcStartTime,
      targetScoreUnit,
      dataCalcNormalAbnormal,
      evaObjTargetCycleId,
      accountContentCode,
      isOpenFundsArrival,
      cycleMode,
      operationInductionId,
      spaceId,
      unit,
      mqDataPosition,
      appId
    );
  }

}
